﻿
var utils = {
    countdown: function (element, count, func) {
        var interval = setInterval(function () {
            var value = element.html();
            if (value == 0) {
                value = count;
                func();
                clearInterval(interval);
            } else {
                value = Number(value) - 1;
            }
            element.html(value);
        }, 1000);
    }
}